package com.black.order.feign;

import com.black.order.feign.fallback.ProductFeignClientFallback;
import com.black.product.bean.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @Author: Young
 * @CreateTime: 2025-07-29
 * @Description: 商品服务Feign客户端
 * @Version: 1.0
 */
@FeignClient(value = "service-product",fallback = ProductFeignClientFallback.class)
public interface ProductFeignClient {

    @GetMapping("/api/product/product/{id}")
    Product getProductById(@PathVariable("id") Long productId, @RequestHeader("Authorization") String token);
}
